package com.chen.scaffolding.nacosconfig.service.impl;

import com.chen.scaffolding.nacosconfig.entity.Authority;
import com.chen.scaffolding.nacosconfig.mapper.AuthorityMapper;
import com.chen.scaffolding.nacosconfig.service.AuthorityService;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 权限
 * @author :master
 */
@Service
public class AuthorityServiceImpl implements AuthorityService {

    @Autowired
    private AuthorityMapper authorityMapper;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void addAuthority(Authority authority) {
        authorityMapper.addAuthority(authority);
    }

    @Override
    public void updateAuthority(Authority authority) {
        authorityMapper.updateAuthority(authority);
    }
}
